3.7.53 \(\int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx\) [653]

3.7.53.1 Optimal result
3.7.53.2 Mathematica [A] (verified)
3.7.53.3 Rubi [A] (verified)
3.7.53.4 Maple [B] (warning: unable to verify)
3.7.53.5 Fricas [B] (verification not implemented)
3.7.53.6 Sympy [F]
3.7.53.7 Maxima [F]
3.7.53.8 Giac [F(-2)]
3.7.53.9 Mupad [F(-1)]

3.7.53.1 Optimal result

Integrand size = 38, antiderivative size = 151 \[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\frac {B \arctan \left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {i a-b} d}+\frac {B \text {arctanh}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {i a+b} d} \]

output
B*arctan((I*a-b)^(1/2)*tan(d*x+c)^(1/2)/(a+b*tan(d*x+c))^(1/2))*cot(d*x+c) 
^(1/2)*tan(d*x+c)^(1/2)/d/(I*a-b)^(1/2)+B*arctanh((I*a+b)^(1/2)*tan(d*x+c) 
^(1/2)/(a+b*tan(d*x+c))^(1/2))*cot(d*x+c)^(1/2)*tan(d*x+c)^(1/2)/d/(I*a+b) 
^(1/2)
 
3.7.53.2 Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.96 \[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\frac {(-1)^{3/4} B \left (-\frac {\arctan \left (\frac {\sqrt [4]{-1} \sqrt {-a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {-a+i b}}-\frac {\arctan \left (\frac {\sqrt [4]{-1} \sqrt {a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {a+i b}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d} \]

input
Integrate[(Sqrt[Cot[c + d*x]]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x 
])^(3/2),x]
 
output
((-1)^(3/4)*B*(-(ArcTan[((-1)^(1/4)*Sqrt[-a + I*b]*Sqrt[Tan[c + d*x]])/Sqr 
t[a + b*Tan[c + d*x]]]/Sqrt[-a + I*b]) - ArcTan[((-1)^(1/4)*Sqrt[a + I*b]* 
Sqrt[Tan[c + d*x]])/Sqrt[a + b*Tan[c + d*x]]]/Sqrt[a + I*b])*Sqrt[Cot[c + 
d*x]]*Sqrt[Tan[c + d*x]])/d
 
3.7.53.3 Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.85, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.184, Rules used = {2011, 3042, 4729, 3042, 4058, 615, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx\)

\(\Big \downarrow \) 2011

\(\displaystyle B \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle B \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}}dx\)

\(\Big \downarrow \) 4729

\(\displaystyle B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}dx\)

\(\Big \downarrow \) 4058

\(\displaystyle \frac {B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)} \left (\tan ^2(c+d x)+1\right )}d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 615

\(\displaystyle \frac {B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \left (\frac {i}{2 (i-\tan (c+d x)) \sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}+\frac {i}{2 \sqrt {\tan (c+d x)} (\tan (c+d x)+i) \sqrt {a+b \tan (c+d x)}}\right )d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\arctan \left (\frac {\sqrt {-b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {-b+i a}}+\frac {\text {arctanh}\left (\frac {\sqrt {b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {b+i a}}\right )}{d}\)

input
Int[(Sqrt[Cot[c + d*x]]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x])^(3/ 
2),x]
 
output
(B*(ArcTan[(Sqrt[I*a - b]*Sqrt[Tan[c + d*x]])/Sqrt[a + b*Tan[c + d*x]]]/Sq 
rt[I*a - b] + ArcTanh[(Sqrt[I*a + b]*Sqrt[Tan[c + d*x]])/Sqrt[a + b*Tan[c 
+ d*x]]]/Sqrt[I*a + b])*Sqrt[Cot[c + d*x]]*Sqrt[Tan[c + d*x]])/d
 

3.7.53.3.1 Defintions of rubi rules used

rule 615
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), 
 x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] 
 /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2011
Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> 
 Simp[(b/d)^m   Int[u*(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, n}, x 
] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c + d*x 
, a + b*x])
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4058
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S 
imp[ff/f   Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x], x, 
 Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a 
*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
 

rule 4729
Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Simp[(c*Cot[a 
+ b*x])^m*(c*Tan[a + b*x])^m   Int[ActivateTrig[u]/(c*Tan[a + b*x])^m, x], 
x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownTangentIntegrandQ[u, 
x]
 
3.7.53.4 Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(761\) vs. \(2(123)=246\).

Time = 16.24 (sec) , antiderivative size = 762, normalized size of antiderivative = 5.05

method result size
default \(\frac {B \sin \left (d x +c \right ) \left (\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \ln \left (\frac {a \cot \left (d x +c \right ) \cos \left (d x +c \right )-2 a \cot \left (d x +c \right )-2 \sqrt {\left (\cot \left (d x +c \right )^{2} a -2 a \cot \left (d x +c \right ) \csc \left (d x +c \right )+a \csc \left (d x +c \right )^{2}-2 b \csc \left (d x +c \right )+2 \cot \left (d x +c \right ) b -a \right ) \left (\cos \left (d x +c \right )-1\right ) \csc \left (d x +c \right )}\, \sqrt {b +\sqrt {a^{2}+b^{2}}}\, \sin \left (d x +c \right )+a \csc \left (d x +c \right )+2 \sqrt {a^{2}+b^{2}}\, \cos \left (d x +c \right )+2 b \cos \left (d x +c \right )-a \sin \left (d x +c \right )-2 \sqrt {a^{2}+b^{2}}-2 b}{\cos \left (d x +c \right )-1}\right )-2 \sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \arctan \left (\frac {\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \cos \left (d x +c \right )-\sqrt {-\frac {2 \left (\cos \left (d x +c \right )^{2} b -\cos \left (d x +c \right ) \sin \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sin \left (d x +c \right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}}{\sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \left (\cos \left (d x +c \right )-1\right )}\right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \ln \left (\frac {a \cot \left (d x +c \right ) \cos \left (d x +c \right )-2 a \cot \left (d x +c \right )+2 \sqrt {\left (\cot \left (d x +c \right )^{2} a -2 a \cot \left (d x +c \right ) \csc \left (d x +c \right )+a \csc \left (d x +c \right )^{2}-2 b \csc \left (d x +c \right )+2 \cot \left (d x +c \right ) b -a \right ) \left (\cos \left (d x +c \right )-1\right ) \csc \left (d x +c \right )}\, \sqrt {b +\sqrt {a^{2}+b^{2}}}\, \sin \left (d x +c \right )+a \csc \left (d x +c \right )+2 \sqrt {a^{2}+b^{2}}\, \cos \left (d x +c \right )+2 b \cos \left (d x +c \right )-a \sin \left (d x +c \right )-2 \sqrt {a^{2}+b^{2}}-2 b}{\cos \left (d x +c \right )-1}\right )+2 \sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \arctan \left (\frac {\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \cos \left (d x +c \right )+\sqrt {-\frac {2 \left (\cos \left (d x +c \right )^{2} b -\cos \left (d x +c \right ) \sin \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sin \left (d x +c \right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}}{\sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \left (\cos \left (d x +c \right )-1\right )}\right )\right ) \sqrt {\cot \left (d x +c \right )}\, \sqrt {a +b \tan \left (d x +c \right )}}{2 d \sqrt {a^{2}+b^{2}}\, \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {2 \left (\cos \left (d x +c \right )^{2} b -\cos \left (d x +c \right ) \sin \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}}\) \(762\)

input
int(cot(d*x+c)^(1/2)*(B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x,method= 
_RETURNVERBOSE)
 
output
1/2*B/d/(a^2+b^2)^(1/2)*sin(d*x+c)*((b+(a^2+b^2)^(1/2))^(1/2)*ln((a*cot(d* 
x+c)*cos(d*x+c)-2*a*cot(d*x+c)-2*((cot(d*x+c)^2*a-2*a*cot(d*x+c)*csc(d*x+c 
)+a*csc(d*x+c)^2-2*b*csc(d*x+c)+2*cot(d*x+c)*b-a)*(cos(d*x+c)-1)*csc(d*x+c 
))^(1/2)*(b+(a^2+b^2)^(1/2))^(1/2)*sin(d*x+c)+a*csc(d*x+c)+2*(a^2+b^2)^(1/ 
2)*cos(d*x+c)+2*b*cos(d*x+c)-a*sin(d*x+c)-2*(a^2+b^2)^(1/2)-2*b)/(cos(d*x+ 
c)-1))-2*(-b+(a^2+b^2)^(1/2))^(1/2)*arctan(1/(-b+(a^2+b^2)^(1/2))^(1/2)*(( 
b+(a^2+b^2)^(1/2))^(1/2)*cos(d*x+c)-(-2*(cos(d*x+c)^2*b-cos(d*x+c)*sin(d*x 
+c)*a-b)/(cos(d*x+c)+1)^2)^(1/2)*sin(d*x+c)-(b+(a^2+b^2)^(1/2))^(1/2))/(co 
s(d*x+c)-1))-(b+(a^2+b^2)^(1/2))^(1/2)*ln((a*cot(d*x+c)*cos(d*x+c)-2*a*cot 
(d*x+c)+2*((cot(d*x+c)^2*a-2*a*cot(d*x+c)*csc(d*x+c)+a*csc(d*x+c)^2-2*b*cs 
c(d*x+c)+2*cot(d*x+c)*b-a)*(cos(d*x+c)-1)*csc(d*x+c))^(1/2)*(b+(a^2+b^2)^( 
1/2))^(1/2)*sin(d*x+c)+a*csc(d*x+c)+2*(a^2+b^2)^(1/2)*cos(d*x+c)+2*b*cos(d 
*x+c)-a*sin(d*x+c)-2*(a^2+b^2)^(1/2)-2*b)/(cos(d*x+c)-1))+2*(-b+(a^2+b^2)^ 
(1/2))^(1/2)*arctan(1/(-b+(a^2+b^2)^(1/2))^(1/2)*((b+(a^2+b^2)^(1/2))^(1/2 
)*cos(d*x+c)+(-2*(cos(d*x+c)^2*b-cos(d*x+c)*sin(d*x+c)*a-b)/(cos(d*x+c)+1) 
^2)^(1/2)*sin(d*x+c)-(b+(a^2+b^2)^(1/2))^(1/2))/(cos(d*x+c)-1)))*cot(d*x+c 
)^(1/2)*(a+b*tan(d*x+c))^(1/2)/(cos(d*x+c)+1)/(-2*(cos(d*x+c)^2*b-cos(d*x+ 
c)*sin(d*x+c)*a-b)/(cos(d*x+c)+1)^2)^(1/2)
 
3.7.53.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 4609 vs. \(2 (119) = 238\).

Time = 0.79 (sec) , antiderivative size = 4609, normalized size of antiderivative = 30.52 \[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\text {Too large to display} \]

input
integrate(cot(d*x+c)^(1/2)*(B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, 
algorithm="fricas")
 
output
1/8*sqrt(((a^2 + b^2)*sqrt(-B^4*a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4))*d^2 + B 
^2*b)/((a^2 + b^2)*d^2))*log(1/2*((2*(B^2*a^3*b^3 + 4*B^2*a*b^5)*d*tan(d*x 
 + c)^2 + 2*(B^2*a^6 + 5*B^2*a^4*b^2 + 8*B^2*a^2*b^4)*d*tan(d*x + c) + 2*( 
B^2*a^5*b + 2*B^2*a^3*b^3)*d - ((a^7 + 8*a^5*b^2 + 19*a^3*b^4 + 12*a*b^6)* 
d^3*tan(d*x + c)^2 + 2*(a^6*b + 2*a^4*b^3 - 3*a^2*b^5 - 4*b^7)*d^3*tan(d*x 
 + c) - (a^7 + 4*a^5*b^2 + 7*a^3*b^4 + 4*a*b^6)*d^3)*sqrt(-B^4*a^2/((a^4 + 
 2*a^2*b^2 + b^4)*d^4)))*sqrt(((a^2 + b^2)*sqrt(-B^4*a^2/((a^4 + 2*a^2*b^2 
 + b^4)*d^4))*d^2 + B^2*b)/((a^2 + b^2)*d^2)) + 2*((B^3*a^5 + 3*B^3*a^3*b^ 
2 + 4*B^3*a*b^4)*tan(d*x + c)^2 + 2*(B^3*a^4*b + 2*B^3*a^2*b^3)*tan(d*x + 
c) - (2*(B*a^5*b + 3*B*a^3*b^3 + 2*B*a*b^5)*d^2*tan(d*x + c)^2 - (B*a^6 + 
4*B*a^4*b^2 + 7*B*a^2*b^4 + 4*B*b^6)*d^2*tan(d*x + c))*sqrt(-B^4*a^2/((a^4 
 + 2*a^2*b^2 + b^4)*d^4)))*sqrt(b*tan(d*x + c) + a)/sqrt(tan(d*x + c)))/(t 
an(d*x + c)^2 + 1)) + 1/8*sqrt(((a^2 + b^2)*sqrt(-B^4*a^2/((a^4 + 2*a^2*b^ 
2 + b^4)*d^4))*d^2 + B^2*b)/((a^2 + b^2)*d^2))*log(-1/2*((2*(B^2*a^3*b^3 + 
 4*B^2*a*b^5)*d*tan(d*x + c)^2 + 2*(B^2*a^6 + 5*B^2*a^4*b^2 + 8*B^2*a^2*b^ 
4)*d*tan(d*x + c) + 2*(B^2*a^5*b + 2*B^2*a^3*b^3)*d - ((a^7 + 8*a^5*b^2 + 
19*a^3*b^4 + 12*a*b^6)*d^3*tan(d*x + c)^2 + 2*(a^6*b + 2*a^4*b^3 - 3*a^2*b 
^5 - 4*b^7)*d^3*tan(d*x + c) - (a^7 + 4*a^5*b^2 + 7*a^3*b^4 + 4*a*b^6)*d^3 
)*sqrt(-B^4*a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)))*sqrt(((a^2 + b^2)*sqrt(-B^ 
4*a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4))*d^2 + B^2*b)/((a^2 + b^2)*d^2)) + ...
 
3.7.53.6 Sympy [F]

\[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=B \int \frac {\sqrt {\cot {\left (c + d x \right )}}}{\sqrt {a + b \tan {\left (c + d x \right )}}}\, dx \]

input
integrate(cot(d*x+c)**(1/2)*(B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))**(3/2),x 
)
 
output
B*Integral(sqrt(cot(c + d*x))/sqrt(a + b*tan(c + d*x)), x)
 
3.7.53.7 Maxima [F]

\[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\int { \frac {{\left (B b \tan \left (d x + c\right ) + B a\right )} \sqrt {\cot \left (d x + c\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]

input
integrate(cot(d*x+c)^(1/2)*(B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, 
algorithm="maxima")
 
output
integrate((B*b*tan(d*x + c) + B*a)*sqrt(cot(d*x + c))/(b*tan(d*x + c) + a) 
^(3/2), x)
 
3.7.53.8 Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]

input
integrate(cot(d*x+c)^(1/2)*(B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, 
algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const 
index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(con 
st gen &
 
3.7.53.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {\cot (c+d x)} (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx=\int \frac {\sqrt {\mathrm {cot}\left (c+d\,x\right )}\,\left (B\,a+B\,b\,\mathrm {tan}\left (c+d\,x\right )\right )}{{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}} \,d x \]

input
int((cot(c + d*x)^(1/2)*(B*a + B*b*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/ 
2),x)
 
output
int((cot(c + d*x)^(1/2)*(B*a + B*b*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/ 
2), x)